package com.changgou.goods.dao;
import com.changgou.goods.pojo.Brand;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/****
 * @Author:黑马训练营
 * @Description:Brand的Dao
 * @Date 未来/6/14 0:12
 *****/
public interface BrandMapper extends Mapper<Brand> {

    /***
     * 根据分类ID查询品牌集合
     */
    @Select("SELECT tb.* FROM tb_category_brand tc , tb_brand tb WHERE tc.brand_id = tb.id AND tc.category_id=#{id}")
    List<Brand> findByCategoryId(Integer id);
}
